<script setup lang="ts">
import { IParam, IComptEventParam } from "@interface";

interface FormPageProps{
  name: string;
  pages: IParam[];
}
interface FormPageEmit{
  (name: 'componentEvent', value: IComptEventParam): void
}
const props = withDefaults(defineProps<FormPageProps>(), {});
const emit = defineEmits<FormPageEmit>();

</script>

<template>
  <a-tabs :class="['app-form-page', `app-form-page-${name}`]">
    <a-tab-pane v-for="(page, index) in pages" :key="index" :tab="page.title">
      <slot></slot>
    </a-tab-pane>
  </a-tabs>
</template>

<style scoped>
.app-form-page {
  height: 100%;
  width: 100%;
}
</style>